"use strict";
/**
 * 抽象类
 * 抽象描述一种抽象的状态，无法被实例化，只能被继承
 * 抽象方法不能在抽象类中实现，只能在具体子类中实现，而且必须实现
 *
 * */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
exports.__esModule = true;
var Animal = /** @class */ (function () {
    function Animal() {
    }
    return Animal;
}());
var Cat = /** @class */ (function (_super) {
    __extends(Cat, _super);
    function Cat() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    //    实现抽象类
    Cat.prototype.speak = function () {
        console.log('喵喵喵');
    };
    return Cat;
}(Animal));
var cat = new Cat();
cat.speak();
var Dog = /** @class */ (function (_super) {
    __extends(Dog, _super);
    function Dog() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    //    实现抽象类
    Dog.prototype.speak = function () {
        console.log('汪汪汪');
    };
    return Dog;
}(Animal));
var dog = new Cat();
dog.speak();
